<template>
  <van-nav-bar :title="title" :left-arrow="leftArrow" fixed @click-left="onClickLeft">
    <template #left v-if="leftArrow">
      <van-icon :name="backIcon" size="20" />
    </template>
  </van-nav-bar>
</template>

<script lang="ts" setup>
defineProps<{ leftArrow?: boolean, title?: string }>()
const onClickLeft = () => history.back();
const backIcon: string = (useRuntimeConfig().public.backIcon as string) || "arrow-left" as unknown as string;
</script>
